package com.example.activityforresult;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

public class ResultActivity extends Activity{
	private TextView tv_phonenumber;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.result);
		tv_phonenumber=(TextView) findViewById(R.id.tv_phonenumber);
		tv_phonenumber.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent intent = new Intent();
				intent.putExtra("telephoneNum", tv_phonenumber.getText().toString());
				setResult(0, intent);
				finish();
			}
		});
	}
}
